#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<algorithm>
#include"List.h"
#include <iostream>
int main()
{
	std::cout << "This is a list test program" << std::endl;
	List Test;
	while (1)
	{
		int Opration;
		scanf("%d", &Opration);
		while (getchar() != '\n');
		switch (Opration)
		{
		case 1:
		{
			auto Data = 'a';
			std::cin >> Data;
			std::cout << Test.PushFront(&Data) << std::endl;
		}break;
		case 2:
		{
			auto Data = 'c';
			std::cin >> Data;
			std::cout << Test.PushTail(&Data) << std::endl;
		}break;
		case 3:
		{
			auto Data = 'a';
			std::cin >> Data;
			std::cout << Test.Delete(&Data) << std::endl;
		}break;
		case 4:
		{
			Test.PopFront();
		}break;
		case 5:
		{
			Test.PopTail();
		}break;
		case 6:
		{
			Test.RangFront();
		}break;
	    case 7:
		{
			Test.RangTail();
		}break;
		}
	}
}